<?php

namespace App\Http\Requests\Front;

use App\Http\Requests\Request;

class TellRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'phone'=>'required|regex:/^1[34578][0-9]{9}$/',
        ];
    }

    public function messages(){
        return [
            'phone.required'=>'请输入您的手机号码',
            'phone.regex'=>'请输入正确的手机格式',
            'phone.unique'=>'该手机号码已验证',
            
        ];

    }
}
